<template>
    <!-- 左侧导航 -->
    <el-aside width="200px" class="aside">
         <el-menu
            default-active="2"
            class="el-menu-vertical-demo" router
          >
            <el-menu-item :index="v.path" v-for="v in nav" :key="v.path">
              <el-icon><icon-menu /></el-icon>
              <span>{{v.title}}</span>
            </el-menu-item>
         </el-menu>
    </el-aside>
</template>

<script setup>
import {
  Document,
  Menu as IconMenu,
  Location,
  Setting,
} from '@element-plus/icons-vue'
import {ref,reactive,onMounted} from 'vue'
//缓存取
import {mainStore} from '../../store/index' //导入状态仓库
import { storeToRefs } from "pinia";
const store = mainStore(); //实例化仓库

// 解构并使数据具有响应式
 const {nav} = storeToRefs(store);



</script>